package com.shop.dingdongshoppingapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * ⽤户表(TUser)实体类
 *
 * @author makejava
 * @since 2022-06-29 17:41:51
 */
@Data
@NoArgsConstructor
@TableName(value = "t_user")
public class User implements Serializable {
    private static final long serialVersionUID = 718919422180435307L;
    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * ⼿机号
     */
    private String phone;
    /**
     * ⽤户名
     */
    private String name;
    /**
     * 密码
     */
    private String password;
    /**
     * 标记位
     */
    private Integer flag;
    /**
     * 优惠券
     */
    private Integer coupon;
    /**
     * 积分
     */
    private Integer integral;
    /**
     * 余额
     */
    private Double balance;

    public User(String phone, String name, String password) {
        this.phone = phone;
        this.name = name;
        this.password = password;
        this.flag = 1;
    }
}

